// 1.导入vue包
import Vue from 'vue'
// 2.引入App.vue根组件
import App from './App.vue'
// 4.引入全局css
import './statics/site/css/style.css'
// 5.使用路由，相当于a标签跳转
import VueRouter from 'vue-router'

Vue.use(VueRouter)
// 6.路由相关
// 导入组件
import layout from "./components/layout.vue"
import goodslist from "./components/goods/goodslist.vue"
const router = new VueRouter({
    routes:[
        {path:"/",redirect:"/site/goodslist"},
        {path:"/site",component:layout,children:[
           {path:"goodslist",component:goodslist} 
        ]}
    ]
})
// 3.创建vue跟实例
new Vue({
    el:"#app",
    router,
    render:function(createElement){
        return createElement(App)

    }

})
